<html lang="cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="/styles.css">
    <link href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
    <title>用户修改</title>
</head>
<body>
<!-- 动态背景 -->
<div class="background"></div>

<!-- 修改表单 -->
<section class="container">

    <!-- 错误信息 -->
    <div id="error-message" class="error-message" style="display: none;"></div>

    <!-- 修改表单 -->
    <form id="edit-form" action="/tihai/edit" method="post">
        <div class="form">
            <input type="text" id="account" name="account" th:value="${session.currentUser.account}" required readonly>
            <input type="text" id="userPwd" name="userPwd" th:value="${session.currentUser.userPwd}" required>
            <input type="text" id="userName" name="userName" th:value="${session.currentUser.userName}" required>
            <select id="sex" name="sex" required>
                <option value="男" th:selected="${session.currentUser.sex =='男'}">男</option>
                <option value="女" th:selected="${session.currentUser.sex =='女'}">女</option>
                <option value="保密" th:selected="${session.currentUser.sex =='保密'}">保密</option>
            </select>
            <textarea style="resize: none ;min-height: 10em; overflow-y: hidden"
                      cols="20"
                      id="introduction"
                      name="introduction"
                      th:text="${session.currentUser.introduction}"
                      rows="10"
                      oninput="this.style.height = 'auto'; this.style.height = this.scrollHeight + 'px'"
            ></textarea>
            <div class="form-actions">
                <button type="submit" class="btn-login">修改</button>
            </div>
        </div>
    </form>
</section>
</body>
</html>